package com.example.demo;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * Created by swallow on 2021/3/24.
 */
@Configuration
public class AConfig extends WebMvcConfigurationSupport {
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AInterceptor()).addPathPatterns("/**").excludePathPatterns("/doLogin", "/login");
        super.addInterceptors(registry);
    }
}
